<script type="text/x-template" id="my-loadpage">
	<div id="my-loadpage-detail-form-info">
		<i class="el-icon-loading"></i> 页面加载中
	</div>
</script>
<script>
	(function () {

		Vue.component('my-loadpage', {
			template: '#my-loadpage',
			props: {
				url: String,
				vueName: String,
				initData: Object
			},
			data() {
				return {
					loading: false
				}
			},
			methods: {
				init() {
					this.doLoadVueForm();
				},
				doLoadVueForm() {
					let that = this;
					that.loading = true;
					myUtil.loadForm({
						el: '#my-loadpage-detail-form-info',
						url: that.url,
						thenFunc(vue) {
							if (that.vueName) {
								window[that.vueName].init(that.initData);
							} else {
								vue.init(that.initData);
							}
							that.loading = false;
						}
					});
				}
			},
			created() {
				this.init()
			}
		});

	})()
</script>



